package com.jt.service.impl;

import com.jt.dao.RoleMapper;
import com.jt.entity.Role;
import com.jt.service.RoleService;
import org.apache.ibatis.session.RowBounds;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RoleServiceImpl  implements RoleService {

    @Autowired
    private RoleMapper roleMapper;

    @Override
    public Integer save(Role role) {
        return roleMapper.save(role);
    }

    @Override
    public Role queryById(Integer id) {
        return roleMapper.queryById(id);
    }

    @Override
    public List<Role> queryAll() {
        return roleMapper.queryAll();
    }

    @Override
    public List<Role> queryPage(RowBounds rowBounds) {
        return roleMapper.queryPage(rowBounds);
    }

    @Override
    public List<Role> queryByIds(Integer[] ids) {
        return roleMapper.queryByIds(ids);
    }

    @Override
    public List<Role> queryByLikeName(String name) {
        return roleMapper.queryByLikeName(name);
    }

    @Override
    public Integer updateStatus(Integer id, Integer status) {
        return roleMapper.updateStatus(id,status);
    }

    @Override
    public Integer update(Role role) {
        return roleMapper.update(role);
    }
}
